package com.company.project;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;


/**
 *
 * 用于发布于tomcat的启动
 *
 *
 */
@SpringBootApplication
////@SpringBootApplication中的@ComponentScan：默认扫描@SpringBootApplication所在类的同级目录以及它的子目录。
public class Application2 extends SpringBootServletInitializer
{

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(Application2.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(Application2.class, args);
    }
}

